This page last changed on Apr 14, 2010 by bobh.

These instructions lead the user through an installation of the FOCE software onto a Linux-based FOCE system.

Some information is also provided as tips for people who want to try out the installation on a Mac. SIAM can make successfully with Java 1.5 on a Mac, but FOCE requires some gnu/linux drivers that will get in the way.

Introduction

For many installations, this process is preceded by installing Linux, SIAM, and FOCE
The following hints or colors indicate steps that only need to be performed for particular environments:

  • (BASE) Required for base installation on a platform (but not thereafter)
  • only required for individual user installation
  • comment that may be useful for a Mac installation.

Install Process

1) Install Java JDK1.5 (BASE)

FOCE requires Java 1.5 (although SIAM for the moorings requires Java 1.3, because of the J9 platform, with FOCE Java 1.5 is OK). It's believed that Java JDK 1.6 will work also.

  • login (or su) as root
  • mkdir /usr/java
  • Download JDK1.5.x from sun.java.com, or get the 1.5.0.15 JDK installer for Linux here.  Copy or move it to /usr/java
  • Execute it; e.g. './jdk-1_5_0_15-linux-i586.bin
  • Default Mac Java is OK.

2) Give ops an account if you want that account set up. (BASE)

This actually should have been done during the Debian Linux setup, but is also provided here for context.

  • Create the account with 'adduser ops', and the same password as on other foce machines.
  • The following groups should already have 'ops' in the name. you'll need to add that for the base install.)
    • users, uucp, dialout
    • (foce2 has "ops uucp dialout cdrom floppy audio video plugdev users io", but this seems to be unneeded.)

3) Give yourself an account

If you want to develop and test from your own account, set up the account now for this environment. These steps assume you are logged in as root.

  • Create the account with 'adduser acctname', replacing acctname with your desired account name.
  • Add your name to the following groups (the syntax is 'adduser user group'):
    • uucp dialout users io

4) Set up .bashrc for required environment variables

  • You can get a version of .bashrc for the 'ops' account here.
  • When done, execute it via '. .bashrc'.  (BASE) This file is for ops, but root needs similar additions to .bashrc.

The aliases in bashrc aren't critical; but for better support from everyone else (who will be used to those aliases), they are recommended.

If running a non-bash shell, you can convert the Bash commands to your shell. But for maximum happiness and interoperability, we suggest switching your Mac environment to bash at this point, to be consistent with Linux.

5) Install RXTX (BASE)

The RXTX library is required for FOCE (but not for SIAM). No equivalent exists for the Mac processor/environment.

You can download and compile this as any user (e.g. 'ops'). But you must do the install as 'root'. For this example, we'll just do the whole thing as root.

  • login or su as root
  • Download rxtx-2.1-7r2.tar.gz. You can get it here. Since we're doing it as root, just download it to root's home directory. (If you want to keep the root directory clean for good form, you can build as a user and then install as root.)
  • tar xzf rxtx-2.1.-7r2.tar.gz
  • cd rxtx-2.1-7r2
  • ./configure
  • make
  • (For the final step, you must be root.) As root, do 'make install'. This will install files to $JAVA_HOME/jre/lib/i386 and $JAVA_HOME/jre/lib/ext
    For Java 1.6
    If you use these instructions for Java 1.6, you will get the following error on 'make install':
     make  all-am
     make[1]: Entering directory `/<mumble mumble your directory>/rxtx-2.1-7r2'
     make[1]: Nothing to be done for `all-am'.
     make[1]: Leaving directory `/<mumble mumble your directory>/rxtx-2.1-7r2'
     libtool: install: `x86_64-unknown-linux-gnu/librxtxRS485.la' is not a directory
     Try `libtool --help --mode=install' for more information.
     make: *** [install] Error 1
    

    To fix this, you must edit the configure script and extend the line:

    1.2*|1.3*|1.4*|1.5*
    

    to:

    1.2*|1.3*|1.4*|1.5*|1.6*
    

6) Install Library for Diamond A/D card (BASE)

The A/D board is used to read various engineering sensors on FOCE.

Get the library, header files, and examples in a tar file here. The only thing you need is the library (the header file is already checked into siam2).

  • tar xzf dscud-5.92-Linux.tar.gz 
  • cd dscud5
  • su root
  • cp libdscud5.a /usr/local/lib

7) Install /etc/sudoers (BASE)

This is needed so that some commands in the Makefile can execute.

  • If /etc/sudoers file does not exist, get a copy here and...
  • Copy it to /etc:
    • cd /etc; cp file /etc/sudoers; chown root sudoers; chgrp root sudoers; chmod 440 sudoers
  • Add yourself to sudoers if you plan to run make from your own account. You probably won't need this on the Mac, if you have admin privileges.
    • Log in as root.
    • Run visudo. Add the following line to the end of the sudoers file, replacing acctname with your account name:
      acctname ALL=/bin/chown,/bin/chmod
    • If you can't stand the default editor, do 'export VISUAL=/usr/bin/vi', or your preferred editor. Then redo the visudo command.

8) Install SIAM

Obtain code
  • Log in as ops. Go to ops home directory
    • For installing to your own account, log in as yourself and go to the directory where the CVS repository for SIAM will be installed.
  • cvs checkout siam2
  • ln -s siam2 siam
  • cd siam
  • cvs checkout puckxml
Configure SIAM pieces
  • cp properties/siamPort.cfg.foce properties/siamPort.cfg

You may have to edit the siamPort.cfg file after you have copied it, to reflect the components installed on this system.
We need a place to document the components currently installed on the system.

  • In the make directory, confirm the top-level Makefile points to make/Makefile.FOCE2009 instead of make/Makefile.FOCE2008.
Make the software
  • make
  • make focepucks
  • make foce
  • make siamjar
  • make siamif.jar (Note - this is used primarily by the GUI)
  • make install  (Note - this unjars siam.jar into $CODEBASE, which is necessary for the GUI)

As noted above, you won't be able to 'make foce' successfully on a Mac, since the IO utilities aren't present.

9) Run FOCE

Verify FOCE isn't already running

You should make sure FOCE isn't running already (if it is, your execution will abort with an error).

To check this, enter 'ps -ef | grep FOCEnode' to search for the FOCE process.

Start up FOCE

You can run FOCE with or without publishing to SSDS. For testing, use the first method without publishing the data to SSDS.  For deployment, use the second method

  • Method 1: not publishing
    • gosiam (this goes to the SIAM home directory)
    • foce &

OR

  • Method 2: publishing (usually done only when publishing is being tested)
    • gosiam
    • foce -publish &

For more information on running FOCE, see this user documentation.

Document generated by Confluence on Feb 03, 2026 14:29